package com.yanqu.road.entity.activity.dunhuangshiku;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

/**
 * npc 血量
 * @Description
 * @Author cwq
 * @Data 2022/9/13 10:44
 */
@FieldTypeAnnotation(tableName = "t_c_dunhuangshiku_npc_blood_data")
public class DunHuangShiKuNpcBloodData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    private long activityId;
    @FieldTypeAnnotation(select = true, update = true, desc = "分组ID")
    private int groupId;
    @FieldTypeAnnotation(select = true, update = true, desc = "事件Id")
    private int eventId;
    @FieldTypeAnnotation(desc = "npc血量")
    private long blood;
    @FieldTypeAnnotation(desc = "生成血量的时间")
    private long createTime;

    public DunHuangShiKuNpcBloodData() {
    }

    public DunHuangShiKuNpcBloodData(long activityId, int groupId, int eventId) {
        this.activityId = activityId;
        this.groupId = groupId;
        this.eventId = eventId;
        setInsertOption();
    }

    public long getActivityId() {
        return activityId;
    }

    public void setActivityId(long activityId) {
        if (!Objects.equals(this.activityId, activityId)) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if (!Objects.equals(this.groupId, groupId)) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getEventId() {
        return eventId;
    }

    public void setEventId(int eventId) {
        if (!Objects.equals(this.eventId, eventId)) {
            this.eventId = eventId;
            setOp(DataStatus.Update);
        }
    }

    public long getBlood() {
        return blood;
    }

    public void setBlood(long blood) {
        if (!Objects.equals(this.blood, blood)) {
            this.blood = blood;
            setOp(DataStatus.Update);
        }
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        if (!Objects.equals(this.createTime, createTime)) {
            this.createTime = createTime;
            setOp(DataStatus.Update);
        }
    }
}
